package wjh.mapper;

import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;
import wjh.pojo.Doctor;

@Repository
public interface ZlyDoctorMapper {
    @Select("SELECT id,name,password,photo,age,sex,duty,department,phone,introduction FROM doctor WHERE id=${value}")
    Doctor findById(int id);

    @Select("SELECT id,name,password,photo,age,sex,duty,department,phone,introduction FROM doctor WHERE department=#{value} LIMIT 1")
    Doctor findByDept(String dept);
}
